


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DEMO</title>
<style type="text/css">
.button {
	font-size: 12px;
	background-color: #efefef;
	border-top: 1px solid #CCCCCC;
	border-right: 1px solid #666666;
	border-bottom: 1px solid #666666;
	border-left: 1px solid #CCCCCC;
	height: 24px;
}
</style>
</head>

<body style="font-size:12px; line-height:25px; margin:0px;">

	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="100%">
				<fieldset align="center">
					<legend>
						<strong>相机</strong>
					</legend>
					<table width="100%" border="0" cellpadding="0" cellspacing="1" class="search-panel">
						<tr>
							<td>
								<table border="0" cellpadding="0" cellspacing="0">
									<tr>
										<th style="width:30px;">&nbsp;</th>
										<td>IP地址:</td>
										<td style="width:130px;"><input type="text"
											id="IPAddress" value="192.168.55.100" style="width:120px;" /></td>
											<td><div class="search-Btn"><button
													id="btnConn">连接</button></div></td>
											<td><div class="search-Btn"><button
													id="btnDisconn">断开连接</button></div></td>
											<!-- <td style="width:45px;"><button class="button"
													id="btnConn">连接</button></td>
											<td style="width:85px;"><button class="button"
													id="btnDisconn">断开连接</button></td> -->
									</tr>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</fieldset>
			</td>
		</tr>
	</table>

	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="100%"><object width="704px" height="576px"
					id="axclient" classid="clsid:5D0BE7DE-4BC2-4F92-A3BA-F977F62BB15C"
					codebase="/plugIn/axclient.cab"> </object>
			</td>
		</tr>
	</table>


</body>
</html>
<script language="javascript">
	function BindEvent()
	{
		window.hSDK = 0;
		
		//连接
		document.getElementById("btnConn").onclick = function() {
			ipaddr = document.getElementById("IPAddress").value;
			document.getElementById("btnConn").disabled = true;
			document.getElementById("btnDisconn").disabled = false;
			axclient.ipstr = ipaddr;
		}
		
		//断开连接
		document.getElementById("btnDisconn").onclick = function() {
			document.getElementById("btnConn").disabled = false;
			document.getElementById("btnDisconn").disabled = true;
			axclient.ipstr = "";
		}
	};
	BindEvent();
</script>
